Skip to content

Make PooledClient.gats and gets fallbacks match Client - #666

Open
sebxt wants to merge 1 commit into
pinterest:masterfrom
sebxt:fix/pooledclient-gats-defaults
Open

sebxt wants to merge 1 commit into
pinterest:masterfrom
sebxt:fix/pooledclient-gats-defaults

Conversation

@sebxt

@sebxt sebxt commented Oct 18, 2026

Copy link
Copy Markdown

Follow up to #642, which fixed PooledClient.gets but left PooledClient.gats behind.

  • PooledClient.gats now takes cas_default and passes expire, default and cas_default through to Client.gats, matching the Client.gats signature and return type.
  • With ignore_exc=True, PooledClient.gats returned the bare default on error instead of a (value, cas) tuple, which broke value, cas = client.gats(key). It now returns (default, cas_default).
  • With ignore_exc=True, PooledClient.gets returned (None, None) on error and ignored the caller's defaults. It now returns (default, cas_default).

Tests: added TestPooledClient tests for gats (found, not found with defaults) and for the ignore_exc error path of gets and gats. The error path tests use an inner client that raises, since the pooled clients are always created with ignore_exc=False. The full unit and integration suite passes.

Fixes #665

Signed-off-by: Sebastian Turner <sebastiant3484@gmail.com>
@sebxt
sebxt requested review from a team and jparise as code owners October 18, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PooledClient.gats does not accept cas_default and returns a non tuple when ignore_exc is set

1 participant